Install V_Sim from sources (on Unix-like platforms)↑ Return to top
Check the necessary libraries
The following libraries are required to compile V_Sim:
- GTK, development files (usually called libgtk2.0-dev in Debian-like distributions) The corresponding dependencies are also required (this includes pkg-config, GLIB development files) ;
- OpenGL, development files (manely gl.h, glu.h and glx.h, usually found in mesa-common-dev, libglu1-mesa-dev in Debian-like distributions).
The following packages are not mandatory:
- NetCDF, development files (for the ETSF support, namely libnetcdf.so) ;
- Openbabel, development files (from version 2.0.0, namely libopenbabel.so) ;
- ABINIT, with binding support for C (from version5.8.x) and Lapack development files.
Download and untar the files
I suppose that you have downloaded v_sim-3.0.tar.bz2 in some working-directory and then unbzipped and untarred it:
$ bunzip2 v_sim-3.0.tar.bz2 | tar xvf -
or, if your tar command supports it:
$ tar -jxvf v_sim-3.0.tar.bz2
Configure, compile and install
In the untar directory with all the sources (v_sim-3.0
in our example), type:
./configure [options]
(see detail of options below, or use --help)make
make install
(must be root for the default installation directory)make clean
In the above, ./configure
has many available options. Type ./configure --help
for a short explanation. It understands all the GNU basic arguments and some specific ones for V_Sim:
--prefix=DIR
to specify your installation directory (/usr/local
is default).--with-etsf-file-format
(previously named--with-nanoquanta
) to compile the plug-in adding support for files from the ETSF group. It requires the NetCDF development files. This option requires version 3.3 or newer.--with-openbabel
to compile the plug-in adding support for many other file formats, see the Openbabel home page. It requires the corresponding development files. This option requires version 3.3 or newer.--with-xsf
to compile the plug-in adding support for the XCrysDen file format, see the related XCrysDen home page. This option requires version 3.4 or newer of V_Sim.--with-abinit=DIR
to compile the plug-in adding support for the ABINIT input file format and symmetry analysis. This option requires V_Sim version 3.4 or newer. TheDIR
argument is the location of a compiled ABINIT library (containingDIR/lib/libabinis.a
and some headers file likeDIR/include/ab6.h
). Additional information on compilation details is provided later in this page.--with-cube
to compile the plug-in adding support for the Cube file format, see the related description page. This option requires version 3.5 or newer of V_Sim.--enable-debug-messages
to compile V_Sim with debug messages (default is disable). This option is to be used by developpers only. It gives a text track on the error output of all actions V_Sim makes.--enable-gtk-doc
to build the documentation of the API (default is disable). This documentation is targetted for developers.--enable-introspection
to build the introspection files used by language bindings. It also compiles a plug-in to add a tab to load Python scripts in the interface. This feature has been introduced in version 3.6 and is still experimental. It requires to have the development files for Python and PyGObject and GObject Introspection.
There are some other less important option to customize V_Sim more
precisely, see configure --help
for a extensive list.
When make install
is done, it will copy all the following files :
- to
$(prefix)/bin
, it will copy the binaryv_sim
. - to
$(prefix)/share/v_sim
, it will copyv_sim.par
,v_sim.res
,v_sim.rc
and the directorypixmaps
. - to
$(prefix)/share/doc/v_sim
, it will copy some legal informations and the directory APIreference (if--enable-gtk-doc
has been given). Several examples will be available there also.
Compiling from SVN sources
Before doing configure make make install
, as stated before, it is necessary to
generate the build system with the autotools. It requires to have
installed:
- autotools (automake and autoconf) ;
- gtk-doc ;
- intltool ;
- libtool.
Then after the svn co
, issue: ./autogen.sh
in V_Sim source directory.
Additional compiling information for ABINIT plug-in
Version matching
The C bindings for ABINIT are available from version 5.6. But since the feature is still considered experimental, not all versions are compatible with V_Sim. The following association of versions are known to work:
- ABINIT v5.6.x with V_Sim 3.4.x ;
- ABINIT v6.6.x with V_Sim 3.5.2 ;
- ABINIT v6.8.x with V_Sim 3.6.1.
Compiling ABINIT to obtain the libabinis.a
file
The libabinis.a
file should
be compiled for dynamic library creation (use -fPIC
option on 64 bits machines with GNU compilers) and should contain the
parser and its dependencies, except the wrtout()
,
leave_new()
and timab()
routines (V_Sim
will provides them).
In ABINIT version 6.6.x, this is automatically done, but NetCDF and ETSF_IO support should be disabled. The following configure line is working on Linux platform with GFortran 4.4:
../configure --enable-bindings --prefix=DIR --disable-netcdf --disable-etsf-io
In this line, DIR
should be replaced by a valid directory to install to. Then issue, make
and make install
as usual.
Compiling V_Sim ABINIT plug-in
The configure of V_Sim from version 3.5.2 will test the proper compilation of libabinis.a
. Given the following configure line:
../configure --with-abinit=DIR FC=gfortran
should output the following lines:
checking for Abinit support... DIR checking ab6_invars.h usability... yes checking ab6_invars.h presence... yes checking for ab6_invars.h... yes checking ab6_symmetry.h usability... yes checking ab6_symmetry.h presence... yes checking for ab6_symmetry.h... yes checking for parser capabilities in libabinis.a from DIR/lib... yes checking for symmetry capabilities in libabinis.a from DIR/lib... yes [...] Plug-ins: [...] With ABINIT support: yes | CFLAGS: -IDIR/include | LDFLAGS LIBS: -LDIR/lib -labinis -llapack
ABINIT library requires Lapack. It is automatically detected by the configure of V_Sim, once Lapack development packages have been installed (liblapack-dev
for Debian-like distribution or lapack-devel
for Fedora). For specific installation paths, use the --with-lapack
option.
From ABINIT version 6.8, ETSF_IO and LibXC are also required. They are automatically looked for in standard installation directories. Non standard installation paths can be set by --with-etsf-io=DIR
and --with-libxc=DIR
options.
Specific points about the installation of V_Sim on MacOSX from sources↑ Return to top
Most of the explanations about how to install V_Sim on Unix-like platforms (see above) apply for the MacOS X environnement, with the following specificities.
Check the necessary libraries
It supposes that Fink is used to retrieve missing dependencies. The following libraries are required to compile and use V_Sim:
- GTK and corresponding dependencies (this includes pkg-config and GLIB). They are named glib2, glib2-dev, gtk+2 and gtk+2-dev ;
- OpenGL, development files (manely gl.h, glu.h and glx.h, usually
located in
/usr/X11/include
).
Configure, compile and install
In the untar directory, type:
./configure --x-includes=/usr/X11/include --x-libraries=/usr/X11/lib
(for more configure options, see above in the Unix section)make
(see the warnings below)make install
(must be root for the default installation directory, use --prefix option at the configure stage to change it)
The make command may raise some issues on MacOS platforms:
- If the compilation fails in the
src
directory with a linking problem on the OpenGL library, this can be solved as explained in the developer resources of Apple. It suggests to add a '-dylib_file' directive to the link stage. To do it, type 'make LDFLAGS="-dylib_file \
' instead of make.
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:\
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib" - If the compilation fails in the
po
directory, then type 'make GMSGFMT=/sw/bin/msgfmt
' instead of make.
Before V_Sim version 3.4, the --with-opengl-path
option was used instead of the two standard '--x-includes
' and
'--x-libraries
' options. The liking problems on OpenGL
should also have been fixed directly in the configure.
Install V_Sim on Windows↑ Return to top
First of all, a version of GTK > 2.4 must be installed and
correctly configured on the computer. If this is not the case,
download an installer setup.exe
from the GTK+
installers for Windows official page.
For V_Sim, there is currently no installer for Windows, but it is simple to install it by following these next instructions.
I suppose that you have downloaded v_sim-3.0.zip in some working-directory
and then unzipped it (click right 'Extract here'
). It
thus creates a directory called V_Sim
with all the files
you need. The V_Sim
directory can be moved wherever you
want. The binary is located in V_Sim/bin
.
If the contents of this V_Sim
directory is
modified, one must edit the file called v_sim.ini
located
in V_Sim/bin
(here is an example). It contains the path to the required files. You just have to replace the given path by the correct paths (i.e. where you have put the V_Sim
directory).
To use the ETSF plugin, the NetCDF DLL must be present on the system in the search path (the directory with V_Sim.exe or c:\WINDOWS). To get this library, go on the NetCDF website and download a binary distribution for Windows.